#pragma once
#include <QWidget>
#include <QPushButton>
class QLabel;
class SImage;
class QPushButton;
class DetailData;
class QGridLayout;

class SPrcAreaButton : public QPushButton
{
	Q_OBJECT
public:
	SPrcAreaButton(QWidget* parent /*= nullptr*/);
	~SPrcAreaButton();
protected:
	bool event(QEvent* e) override;
	void paintEvent(QPaintEvent*) override;
private:
	bool	m_hover = false;
};

//申购区间 
class BondDetailPrcArea : public QWidget
{
	Q_OBJECT
public:
    BondDetailPrcArea(QWidget* p,QSharedPointer<DetailData> data);
    void setBondInfo(QSharedPointer<DetailData> data);
	void refreshData();
protected:
	void getAreaData();
	void updatePriceArea();
protected slots:
	void onDownloadInfo();
private:
	SPrcAreaButton*				m_downloadInfoBtn = nullptr;
	QString						m_price = "--";
    QSharedPointer<DetailData>  m_data = nullptr;
	QLabel*						m_priceArea = nullptr;
	QString						m_strManualUrl = "";
};